package cn.tedu.spring.config;

import cn.tedu.spring.bean.UserService;
import cn.tedu.spring.resource.WeiboMapper;
import cn.tedu.spring.scope.UserController;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * 测试SpringConfig
 */
public class TestSpringConfig {
    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext(SpringConfig.class);

        WeiboMapper weiboMapper = context.getBean(WeiboMapper.class);
        System.out.println(weiboMapper);

        UserService userService = context.getBean(UserService.class);
        System.out.println(userService);
    }
}
